package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the AUD_BUSQ_MULT_SEDES database table.
 * 
 */
@Embeddable
public class AudBusqMultSedePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private long audBusqPartidaId;
	private String codSede;

    public AudBusqMultSedePK() {
    }

	@Column(name="AUD_BUSQ_PARTIDA_ID", unique=true, nullable=false)
	public long getAudBusqPartidaId() {
		return this.audBusqPartidaId;
	}
	public void setAudBusqPartidaId(long audBusqPartidaId) {
		this.audBusqPartidaId = audBusqPartidaId;
	}

	@Column(name="COD_SEDE", unique=true, nullable=false, length=2)
	public String getCodSede() {
		return this.codSede;
	}
	public void setCodSede(String codSede) {
		this.codSede = codSede;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof AudBusqMultSedePK)) {
			return false;
		}
		AudBusqMultSedePK castOther = (AudBusqMultSedePK)other;
		return 
			(this.audBusqPartidaId == castOther.audBusqPartidaId)
			&& this.codSede.equals(castOther.codSede);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.audBusqPartidaId ^ (this.audBusqPartidaId >>> 32)));
		hash = hash * prime + this.codSede.hashCode();
		
		return hash;
    }
}